/**
 * Project: shuyin-sync
 * 
 * File Created at Mar 22, 2012
 * $Id$
 * 
 * Copyright 2008 6677bank.com Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * 6677bank Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with 6677bank.com.
 */
package com.bank6677.sync.csm.helper;

/**
 * 分类信息帮助类
 * 
 * @author liyue
 * @version ClassificationHelper.java Mar 22, 2012 1:56:25 PM
 */
public class ClassificationHelper {

    /** 激活 */
    public static String        ACTIVE                          = "1"; //激活
    /** 未激活 */
    public static String        INVALID                         = "2"; //未激活

    /** 分类类别 弃单 */
    public static String        CATEGORY_DROP                   = "1";
    /** 分类类别 预约 */
    public static String        CATEGORY_RESERVATION            = "2";
    /** 分类类别 投诉 */
    public static String        CATEGORY_COMPLAINT              = "3";
    /** 分类类别 咨询 */
    public static String        CATEGORY_CONSULTATION           = "4";
    /** 分类类别 知识库 */
    public static String        CATEGORY_KNOWLEDGE              = "5";

    /**
     * 第一级弃单父ID
     */
    public static final int     CATEGORY_PARENT_ID              = 0;

    ////  new reserve type  ////
    private static final String RES_NEW_NEW_APPLICATION         = "1";
    private static final String RES_NEW_MOD_APPLICATION         = "2";
    private static final String RES_NEW_ADD_MATERIAL            = "3";
    @SuppressWarnings("unused")
    private static final String RES_NEW_BACK_APPLICATION        = "4";

    ////////////////  newbo constants  /////////////
    public static final String  OLD_ACTIVE                      = "0";
    public static final String  OLD_INVALID                     = "1";

    public static final Integer PRE_OLD_REJECT_CATEGORY_ID      = 900; //老弃单类型转换为新类型后需要+900
    public static final Integer PRE_OLD_RESERVATION_CATEGORY_ID = 800; //老预约类型转换为新类型后需要+800

    ////  old reserve type ///
    private static final String RES_OLD_NEW_APPLICATION         = "1";
    private static final String RES_OLD_ADD_MATERIAL            = "2";
    private static final String RES_OLD_MOD_APPLICATION         = "3";

    /**
     * 获取类型状态
     * 
     * @param oldStatus
     * @return
     */
    public static String getNewStatus(String oldStatus) {
        if (OLD_ACTIVE.equals(oldStatus)) {
            return ACTIVE;
        } else {
            return INVALID;
        }
    }

    /**
     * 获取新预约类型
     * 
     * @param oldType
     * @return
     */
    public static String getNewReservationType(String oldType) {
        if (RES_OLD_NEW_APPLICATION.equals(oldType)) {
            return RES_NEW_NEW_APPLICATION;
        } else if (RES_OLD_ADD_MATERIAL.equals(oldType)) {
            return RES_NEW_MOD_APPLICATION;
        } else if (RES_OLD_MOD_APPLICATION.equals(oldType)) {
            return RES_NEW_ADD_MATERIAL;
        }
        return "0";
    }
}
